import Cookies from 'js-cookie';
// 设置cookie
export const SETCOOKIE = (name, Cookie) => {
  Cookies.set(name, Cookie, { expires: 7 });
};

// 获取cookies
export const GETCOOKIE = (name) => Cookies.get(name);

// 删除cookies
export const REMOVECOOKIE = (name) => {
  Cookies.remove(name);
};

export const SETLOCALSTORE = (name, obj) => {
  window.localStorage.setItem(name, obj);
};

export const GETLOCALSTORE = (name) => window.localStorage.getItem(name);

export const REMOVELOCALSTORE = (name) => {
  window.localStorage.removeItem(name);
};

export const SETSESSIONSTORE = (name, obj) => {
  window.sessionStorage.setItem(name, obj);
};

export const GETSESSIONSTORE = (name) => window.sessionStorage.getItem(name);

export const REMOVESESSIONSTORE = (name) => {
  window.sessionStorage.removeItem(name);
};
